package cn.jcby.app.lebu.utils;

import cn.jcby.app.excpt.MSException;
import org.springframework.validation.BindingResult;

public class ParamUtils {

    /**
     * 检查参数是否按要求传
     * @param binding
     */
    public static void check(BindingResult binding) {
        if(binding.hasErrors()){
            throw new MSException(binding.getFieldError().getDefaultMessage());
        }
    }
}
